<style type="text/css" media="screen">
{{if poll.css}}
  {{poll.css}}
{{else}}
.ds-poll {background-color:#EBF4FA;border-color:#116092;border-style:solid;border-width:1px;
  -moz-border-radius:3px;-webkit-border-radius:3px; padding:5px 4px 5px 8px;}
  .ds-poll div {padding:2px;}
.ds-poll-title {font-size:120%;font-weight:600;}
.ds-poll-vote input {background-color:#EBE9ED;border-color:#116092;color:#235C9D;
    -moz-border-radius:3px;-webkit-border-radius:3px;cursor:pointer;
    border-style:solid;border-width:1px;font-size:120%;
    line-height:1.6em;padding:4px 16px;text-decoration:none;}
#ds-poll-form div label {width:130px;display:inline!important;float:none!important;
    margin:0pt 0pt 0px;padding:0px 0px;text-align:left;}
{{endif}}
</style>
<div id="poll_{{poll.id}}" class="ds-poll">
    <form  id="ds-poll-form">
    <input type="hidden" id="poll_id" name="poll_id" value="{{poll.id}}" />
    {{for q in poll.questions}}
    <div class="ds-poll-title" >{{q.question}}</div>
    <div id="ds-poll-question">
        <input type="hidden" id="q_id" name="q_id" value="{{q.id}}" />
        {{for o in q.options}}
        <div>
            <input value="{{o.id}}" id="ds_option_{{q.id}}" name="ds_option_{{q.id}}" class="ds-poll-radiobutton" type="radio"  />
            <label for="ds_option_{{q.id}}">{{o.option}}</label>
        </div>
        {{endfor}}
        
    </div>
    {{endfor}}
    <div class="ds-poll-vote">
        <input class="" type="button"  value="submit"/>
        <br />
        <a href="#ds-poll-vote">> View Results</a>
    </div>
    </form>
    <div id="ds-poll-results-target">
        
    </div>
</div>
<script type="text/javascript">
$(document).ready(function() {
    $('#poll_{{poll.id}}').dspoll();
});
</script>